#!/bin/sh
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------


echo "

Thank you for choosing to install SCO Software.
"
#
# Check if root
#
if [ "$USER" = "root" ]; then
while true
do
  echo "Would you like to Continue install or Quit ? [y/q] \c"

  read ans
  case "$ans" in
        y|Y|yes|YES) exec $COMPANY_DIR/_install/install;exit 0
            ;;
        N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo "   cancelling installation"; sleep 5 ; exit 1
            ;;
        * ) echo ; echo ; echo "Please answer with y if you wish to install,"
                   echo "   or q if you wish to quit (stop the install)"
            ;;
  esac
done
 
else
while true
do
  echo "You need to be super user to install this software. \c"
  echo ""
  echo "Would you like to Continue install, or Quit ? [y/q] \c"

  read ans
  case "$ans" in
        y|Y|yes|YES) echo "";echo "Enter super user \c";su root -c '$COMPANY_DIR/_install/install';exit 0
            ;;
        N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo "   cancelling installation"; sleep 5 ; exit 1
            ;;
        * ) echo ; echo ; echo "Please answer with y if you wish to install,"
                   echo "   or q if you wish to quit (stop the install)"
            ;;
  esac
done

 
fi
